#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.67])
LT_PREREQ([2.2.6b])

AC_INIT([gwibber-service-plurk], [0.0], [http://code.google.com/p/gwibber-service-plurk/])
AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dist-gzip dist-xz silent-rules])
LT_INIT
gl_INIT

AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])

AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CC
AM_PROG_VALAC([0.12.0])
gl_EARLY

# Checks for libraries.
AM_PATH_GLIB_2_0([2.28.6], [
                  VALA_CFLAGS="$VALA_CFLAGS $GLIB_CFLAGS"
                  VALA_LIBS="$VALA_LIBS $GLIB_LIBS"
                  ], AC_MSG_ERROR([glib-2.0 >= 2.28.6 not found]), [gobject gthread])
PKG_CHECK_MODULES([SOUP], [libsoup-2.4], [
                   VALA_CFLAGS="$VALA_CFLAGS $SOUP_CFLAGS"
                   VALA_LIBS="$VALA_LIBS $SOUP_LIBS"
                   ], AC_MSG_ERROR([libsoup-2.4 not found]))
PKG_CHECK_MODULES([JSON], [json-glib-1.0], [
                   VALA_CFLAGS="$VALA_CFLAGS $JSON_CFLAGS"
                   VALA_LIBS="$VALA_LIBS $JSON_LIBS"
                   ], AC_MSG_ERROR([json-glib-1.0 not found]))

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

VALA_FLAGS="--enable-mem-profiler --pkg libsoup-2.4 --pkg json-glib-1.0"

AC_SUBST(VALA_CFLAGS)
AC_SUBST(VALA_FLAGS)
AC_SUBST(VALA_LIBS)

AC_CONFIG_FILES([Makefile
                 gnulib/Makefile
                 vapi/Makefile
                 src/Makefile])

AC_OUTPUT
